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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.r: G = None
        self.q: A = 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.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.r: G = None
        self.q: A = 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.x: C = None
        self.txt = txt

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

j.y = e
j.z = e
j.r = c
j.t = n
j.q = d
j.w = d
d.y = i
d.v = i
k.v = l
k.x = d
l.v = k
e.t = c
e.u = d
e.r = i
e.q = n
c.o = j
i.x = k
n.y = e
n.z = e
n.r = c
n.t = j
n.q = d
n.w = d
assert n.y.u.y.txt == "i"