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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.x: B = None
        self.r: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.y: F = None
        self.v: E = None
        self.q: B = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: E = None
        self.t: A = None
        self.txt = txt

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

a = A("a")
j = B("j")
i = C("i")
l = D("l")
g = E("g")
c = F("c")
n = G("n")
f = E("f")
h = B("h")

a.t = n
a.x = i
a.z = c
a.v = l
a.o = f
a.y = j
j.t = l
j.s = h
i.q = a
l.p = c
l.o = c
l.w = c
l.x = j
l.r = f
g.x = f
g.v = f
g.s = f
g.z = n
g.y = c
g.q = j
g.u = j
c.o = g
c.s = f
c.t = a
n.v = a
n.r = a
n.w = l
n.x = l
n.y = g
f.x = g
f.v = g
f.s = g
f.z = n
f.y = c
f.q = j
f.u = j
h.t = l
h.s = j
assert f.u.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.z: F = None
        self.v: D = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.x: B = None
        self.r: E = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.y: F = None
        self.v: E = None
        self.q: B = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: E = None
        self.t: A = None
        self.txt = txt

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

a = A("a")
j = B("j")
i = C("i")
l = D("l")
g = E("g")
c = F("c")
n = G("n")
f = E("f")
h = B("h")

a.t = n
a.x = i
a.z = c
a.v = l
a.o = f
a.y = j
j.t = l
j.s = h
i.q = a
l.p = c
l.o = c
l.w = c
l.x = j
l.r = f
g.x = f
g.v = f
g.s = f
g.z = n
g.y = c
g.q = j
g.u = j
c.o = g
c.s = f
c.t = a
n.v = a
n.r = a
n.w = l
n.x = l
n.y = g
f.x = g
f.v = g
f.s = g
f.z = n
f.y = c
f.q = j
f.u = j
h.t = l
h.s = j
assert f.u.s.s.txt == "j"