class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.v: E = None
        self.p: E = None
        self.y: C = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.txt = txt

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

b = A("b")
e = B("e")
c = C("c")
a = D("a")
n = E("n")
f = F("f")
i = G("i")
l = H("l")
m = A("m")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.txt = txt

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

b = A("b")
e = B("e")
c = C("c")
a = D("a")
n = E("n")
f = F("f")
i = G("i")
l = H("l")
m = A("m")

b.t = m
b.q = c
b.y = c
b.z = c
b.v = n
b.p = n
b.s = a
e.q = n
e.t = l
c.t = m
c.q = m
c.r = f
c.x = f
c.w = l
c.s = l
c.u = a
a.x = c
a.t = b
a.q = e
n.t = e
n.r = e
n.z = a
f.u = b
f.v = c
f.w = l
f.t = i
f.r = e
i.y = b
i.r = a
l.x = m
l.w = f
l.y = f
l.r = n
l.v = n
l.z = n
l.u = c
l.t = e
m.t = b
m.q = c
m.y = c
m.z = c
m.v = n
m.p = n
m.s = a
assert f.t.y.s.x.txt == "c"