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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: D = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: D = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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