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

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

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

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

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

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

a = A("a")
b = B("b")
d = C("d")
i = D("i")
l = E("l")
n = F("n")
f = B("f")
k = D("k")

a.t = l
a.r = n
a.y = k
a.s = d
a.u = d
a.v = d
b.o = a
d.p = k
d.q = k
d.v = k
d.s = n
d.x = a
d.t = a
i.r = l
i.o = k
l.s = b
l.o = k
l.q = n
l.u = d
l.v = d
n.p = f
n.q = d
n.v = k
f.o = a
k.r = l
k.o = i
assert l.u.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.y: D = None
        self.s: C = None
        self.u: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

a = A("a")
b = B("b")
d = C("d")
i = D("i")
l = E("l")
n = F("n")
f = B("f")
k = D("k")

a.t = l
a.r = n
a.y = k
a.s = d
a.u = d
a.v = d
b.o = a
d.p = k
d.q = k
d.v = k
d.s = n
d.x = a
d.t = a
i.r = l
i.o = k
l.s = b
l.o = k
l.q = n
l.u = d
l.v = d
n.p = f
n.q = d
n.v = k
f.o = a
k.r = l
k.o = i
assert l.u.x.s.txt == "d"