class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.o: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.q: F = None
        self.v: H = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.x: F = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.x: H = None
        self.p: D = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.z: A = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

m = A("m")
j = B("j")
l = C("l")
k = D("k")
d = E("d")
f = F("f")
a = G("a")
c = H("c")
g = F("g")

m.r = g
m.w = c
m.u = l
j.w = m
j.t = m
j.o = d
j.v = d
l.p = c
l.w = c
l.v = c
l.q = g
l.r = d
l.t = m
k.r = c
k.v = c
k.w = d
k.u = d
k.x = f
d.r = j
f.v = j
f.x = j
f.z = d
a.w = d
a.s = j
a.x = c
a.z = c
a.p = k
a.v = m
c.w = k
c.y = k
c.x = k
c.r = l
c.z = m
g.v = j
g.x = j
g.z = d
assert m.u.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.o: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.q: F = None
        self.v: H = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.x: F = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.x: H = None
        self.p: D = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.z: A = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

m = A("m")
j = B("j")
l = C("l")
k = D("k")
d = E("d")
f = F("f")
a = G("a")
c = H("c")
g = F("g")

m.r = g
m.w = c
m.u = l
j.w = m
j.t = m
j.o = d
j.v = d
l.p = c
l.w = c
l.v = c
l.q = g
l.r = d
l.t = m
k.r = c
k.v = c
k.w = d
k.u = d
k.x = f
d.r = j
f.v = j
f.x = j
f.z = d
a.w = d
a.s = j
a.x = c
a.z = c
a.p = k
a.v = m
c.w = k
c.y = k
c.x = k
c.r = l
c.z = m
g.v = j
g.x = j
g.z = d
assert m.u.t.r.txt == "g"