class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.u: G = None
        self.v: F = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.v: C = None
        self.r: G = None
        self.s: C = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.u: E = None
        self.z: C = None
        self.v: G = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

i = A("i")
j = B("j")
l = C("l")
c = D("c")
f = E("f")
h = F("h")
b = G("b")
d = A("d")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.v: C = None
        self.r: G = None
        self.s: C = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.u: E = None
        self.z: C = None
        self.v: G = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

i = A("i")
j = B("j")
l = C("l")
c = D("c")
f = E("f")
h = F("h")
b = G("b")
d = A("d")

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