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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.r: E = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
l = D("l")
b = E("b")
k = F("k")
h = E("h")

e.u = b
e.y = d
e.w = d
e.v = h
e.z = k
e.t = k
j.r = l
j.u = b
d.q = l
d.w = l
d.s = k
d.t = j
d.p = j
d.u = h
l.s = j
l.x = h
l.r = h
l.q = e
l.v = b
b.y = h
b.q = l
b.p = e
b.v = j
k.v = j
k.q = d
h.y = b
h.q = l
h.p = e
h.v = j
assert k.v.r.x.v.r.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.v: E = None
        self.z: F = None
        self.w: C = None
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.r: E = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
l = D("l")
b = E("b")
k = F("k")
h = E("h")

e.u = b
e.y = d
e.w = d
e.v = h
e.z = k
e.t = k
j.r = l
j.u = b
d.q = l
d.w = l
d.s = k
d.t = j
d.p = j
d.u = h
l.s = j
l.x = h
l.r = h
l.q = e
l.v = b
b.y = h
b.q = l
b.p = e
b.v = j
k.v = j
k.q = d
h.y = b
h.q = l
h.p = e
h.v = j
assert k.v.r.x.v.r.v.v.txt == "j"