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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: G = None
        self.txt = txt

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

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

n = A("n")
f = B("f")
a = C("a")
g = D("g")
h = E("h")
b = F("b")
m = G("m")
l = C("l")
k = D("k")
d = B("d")

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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: G = None
        self.txt = txt

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

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

n = A("n")
f = B("f")
a = C("a")
g = D("g")
h = E("h")
b = F("b")
m = G("m")
l = C("l")
k = D("k")
d = B("d")

n.x = b
n.r = b
n.u = k
n.t = l
f.p = d
a.y = l
g.u = m
g.t = b
h.t = m
h.w = m
b.s = h
b.y = f
b.u = d
b.q = d
m.u = h
m.o = h
m.q = d
m.p = k
m.x = a
m.r = g
m.t = b
l.y = a
k.u = m
k.t = b
d.p = f
assert k.u.x.y.y.y.y.y.y.y.txt == "l"