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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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