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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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