class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.o: F = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.y: G = None
        self.p: G = None
        self.u: E = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.s: F = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.x: C = None
        self.p: D = None
        self.w: F = None
        self.u: C = None
        self.r: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.r: F = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

b = A("b")
m = B("m")
n = C("n")
g = D("g")
c = E("c")
f = F("f")
a = G("a")
e = H("e")
d = F("d")
j = E("j")

b.q = g
b.s = g
m.r = d
m.o = d
m.y = g
m.x = f
m.t = e
n.s = e
n.q = d
n.y = a
n.p = a
n.u = c
n.w = j
n.t = g
g.x = n
g.o = n
g.z = n
g.r = a
c.p = a
c.o = b
c.t = j
c.s = m
c.x = m
c.z = e
c.v = n
c.r = g
f.z = b
f.t = b
f.y = a
f.s = d
f.u = m
a.y = b
a.v = e
a.x = n
a.u = n
a.p = g
a.w = d
a.r = c
a.q = m
e.u = b
e.t = g
e.q = g
e.r = f
e.p = d
d.z = b
d.t = b
d.y = a
d.s = f
d.u = m
j.p = a
j.o = b
j.t = c
j.s = m
j.x = m
j.z = e
j.v = n
j.r = g
assert f.s.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.o: F = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.y: G = None
        self.p: G = None
        self.u: E = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.s: F = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.x: C = None
        self.p: D = None
        self.w: F = None
        self.u: C = None
        self.r: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.r: F = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

b = A("b")
m = B("m")
n = C("n")
g = D("g")
c = E("c")
f = F("f")
a = G("a")
e = H("e")
d = F("d")
j = E("j")

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