class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: F = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.y: C = None
        self.o: C = None
        self.z: A = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

c = A("c")
i = B("i")
h = C("h")
m = D("m")
e = E("e")
b = F("b")
d = G("d")
a = B("a")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: F = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.y: C = None
        self.o: C = None
        self.z: A = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

c = A("c")
i = B("i")
h = C("h")
m = D("m")
e = E("e")
b = F("b")
d = G("d")
a = B("a")

c.y = h
c.u = h
c.x = m
i.p = b
i.y = a
h.r = d
h.t = d
h.s = d
h.u = b
m.z = h
m.p = d
m.t = c
m.q = c
m.x = i
m.v = b
e.x = i
e.z = i
e.w = c
e.q = b
b.o = h
b.z = a
b.u = m
b.y = c
b.q = d
b.t = e
d.t = h
d.y = h
d.o = h
d.s = m
d.x = m
d.z = c
d.p = c
a.p = b
a.y = i
assert c.x.v.u.z.u.txt == "b"