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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: A = None
        self.y: I = None
        self.p: I = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.p: D = None
        self.o: D = None
        self.s: E = None
        self.w: B = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: J = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.x: I = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: A = None
        self.y: I = None
        self.p: I = None
        self.u: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.p: D = None
        self.o: D = None
        self.s: E = None
        self.w: B = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: J = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.x: I = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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