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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.s: D = None
        self.v: C = None
        self.t: E = None
        self.txt = txt

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

i.t = h
i.q = h
i.o = n
i.r = d
j.x = d
n.w = l
n.p = h
n.r = j
n.o = f
g.w = h
f.s = l
f.r = l
f.x = l
f.z = i
f.v = n
f.y = n
f.o = j
l.w = f
l.o = j
l.r = j
l.v = h
h.z = n
h.v = n
h.q = i
h.s = g
h.t = f
d.x = j
assert l.v.t.r.w.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.r: B = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.s: D = None
        self.v: C = None
        self.t: E = None
        self.txt = txt

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

i.t = h
i.q = h
i.o = n
i.r = d
j.x = d
n.w = l
n.p = h
n.r = j
n.o = f
g.w = h
f.s = l
f.r = l
f.x = l
f.z = i
f.v = n
f.y = n
f.o = j
l.w = f
l.o = j
l.r = j
l.v = h
h.z = n
h.v = n
h.q = i
h.s = g
h.t = f
d.x = j
assert l.v.t.r.w.y.o.txt == "f"