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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.p: B = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.p: B = None
        self.w: C = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

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

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