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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.w: F = None
        self.v: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.w: F = None
        self.v: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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