class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.x: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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