class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: B = None
        self.s: D = None
        self.u: F = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
k = B("k")
h = C("h")
n = D("n")
j = E("j")
b = F("b")
i = C("i")
d = A("d")
g = A("g")
c = D("c")

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: B = None
        self.s: D = None
        self.u: F = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
k = B("k")
h = C("h")
n = D("n")
j = E("j")
b = F("b")
i = C("i")
d = A("d")
g = A("g")
c = D("c")

l.q = b
l.v = c
l.o = d
k.o = b
k.x = j
k.r = h
h.y = j
h.u = b
h.x = k
h.s = c
h.w = c
h.v = l
n.u = h
j.r = g
j.w = k
j.q = k
j.s = n
j.u = b
j.o = i
b.s = n
b.y = i
b.t = h
i.y = j
i.u = b
i.x = k
i.s = n
i.w = n
i.v = g
d.q = b
d.v = c
d.o = l
g.q = b
g.v = c
g.o = d
c.u = h
assert b.y.s.u.v.o.txt == "d"