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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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