class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: F = None
        self.p: E = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.v: G = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.w: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.v: G = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.w: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

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

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