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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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

j.u = e
j.r = a
n.z = e
b.y = a
b.z = a
c.u = l
a.t = j
a.z = e
a.s = c
f.z = a
f.y = h
f.w = j
e.u = l
h.z = a
h.y = f
h.w = j
l.y = a
l.z = a
k.z = a
k.y = f
k.w = j
assert e.u.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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

j.u = e
j.r = a
n.z = e
b.y = a
b.z = a
c.u = l
a.t = j
a.z = e
a.s = c
f.z = a
f.y = h
f.w = j
e.u = l
h.z = a
h.y = f
h.w = j
l.y = a
l.z = a
k.z = a
k.y = f
k.w = j
assert e.u.z.s.txt == "c"