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

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

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

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

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

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

h = A("h")
l = B("l")
n = C("n")
b = D("b")
j = E("j")
c = F("c")
i = B("i")
k = F("k")

h.u = n
l.y = c
l.w = c
l.t = j
l.p = i
l.r = n
n.s = h
n.w = i
b.p = j
b.o = j
b.y = j
b.t = k
b.x = l
j.s = i
j.y = c
c.o = k
c.u = l
i.y = c
i.w = c
i.t = j
i.p = l
i.r = n
k.o = c
k.u = l
assert c.u.r.s.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

h = A("h")
l = B("l")
n = C("n")
b = D("b")
j = E("j")
c = F("c")
i = B("i")
k = F("k")

h.u = n
l.y = c
l.w = c
l.t = j
l.p = i
l.r = n
n.s = h
n.w = i
b.p = j
b.o = j
b.y = j
b.t = k
b.x = l
j.s = i
j.y = c
c.o = k
c.u = l
i.y = c
i.w = c
i.t = j
i.p = l
i.r = n
k.o = c
k.u = l
assert c.u.r.s.u.w.txt == "i"