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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.v: D = None
        self.t: C = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.txt = txt

n = A("n")
b = B("b")
h = C("h")
e = D("e")
f = E("f")
k = F("k")
l = G("l")
j = A("j")

n.y = h
n.s = k
n.r = e
n.v = e
n.x = f
b.o = l
b.u = l
b.q = l
b.p = l
b.v = e
b.t = h
h.u = j
e.v = b
e.t = f
f.o = l
f.p = l
f.v = b
k.p = e
k.w = e
k.u = f
l.t = e
l.r = b
j.y = h
j.s = k
j.r = e
j.v = e
j.x = f
assert b.v.v.t.u.y.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.r: D = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.v: D = None
        self.t: C = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.txt = txt

n = A("n")
b = B("b")
h = C("h")
e = D("e")
f = E("f")
k = F("k")
l = G("l")
j = A("j")

n.y = h
n.s = k
n.r = e
n.v = e
n.x = f
b.o = l
b.u = l
b.q = l
b.p = l
b.v = e
b.t = h
h.u = j
e.v = b
e.t = f
f.o = l
f.p = l
f.v = b
k.p = e
k.w = e
k.u = f
l.t = e
l.r = b
j.y = h
j.s = k
j.r = e
j.v = e
j.x = f
assert b.v.v.t.u.y.u.y.txt == "h"