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

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

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

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

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

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

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

h.u = e
h.r = g
h.y = g
h.s = n
h.v = m
j.y = h
j.o = k
k.y = j
k.p = c
k.u = g
i.o = h
i.v = e
i.w = k
n.v = c
n.t = l
m.q = l
c.u = i
c.r = g
c.s = n
c.y = j
c.v = m
e.o = h
e.v = l
e.w = k
l.o = h
l.v = e
l.w = k
g.y = c
g.o = k
assert j.o.u.o.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.s: E = None
        self.y: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

h.u = e
h.r = g
h.y = g
h.s = n
h.v = m
j.y = h
j.o = k
k.y = j
k.p = c
k.u = g
i.o = h
i.v = e
i.w = k
n.v = c
n.t = l
m.q = l
c.u = i
c.r = g
c.s = n
c.y = j
c.v = m
e.o = h
e.v = l
e.w = k
l.o = h
l.v = e
l.w = k
g.y = c
g.o = k
assert j.o.u.o.y.o.txt == "k"