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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.t: F = None
        self.w: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: B = None
        self.t: D = None
        self.v: E = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

j.x = f
j.r = f
l.p = h
l.u = k
l.t = a
l.w = a
l.z = j
i.y = a
i.q = l
i.r = l
i.x = l
i.t = k
i.v = f
k.r = j
k.w = e
k.y = f
k.p = l
k.v = g
e.x = k
e.v = h
e.y = f
e.u = a
h.u = j
g.y = h
g.q = l
g.r = l
g.x = l
g.t = k
g.v = f
f.x = k
f.v = a
f.y = e
f.u = h
a.u = j
assert l.u.y.y.v.u.x.v.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.t: F = None
        self.w: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: B = None
        self.t: D = None
        self.v: E = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

j.x = f
j.r = f
l.p = h
l.u = k
l.t = a
l.w = a
l.z = j
i.y = a
i.q = l
i.r = l
i.x = l
i.t = k
i.v = f
k.r = j
k.w = e
k.y = f
k.p = l
k.v = g
e.x = k
e.v = h
e.y = f
e.u = a
h.u = j
g.y = h
g.q = l
g.r = l
g.x = l
g.t = k
g.v = f
f.x = k
f.v = a
f.y = e
f.u = h
a.u = j
assert l.u.y.y.v.u.x.v.u.x.txt == "f"