class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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