class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.s: A = None
        self.p: F = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.s: A = None
        self.p: F = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

g.x = b
g.p = j
g.t = j
c.v = b
c.w = e
c.p = e
c.s = g
c.t = g
c.o = g
l.s = h
l.x = e
b.s = c
b.w = i
b.t = e
b.p = e
b.v = h
b.x = g
k.q = e
e.v = h
e.o = g
h.s = l
h.u = e
h.w = i
h.x = g
h.o = b
i.q = e
j.s = c
j.w = i
j.t = e
j.p = e
j.v = h
j.x = g
assert k.q.o.p.t.v.x.p.s.v.txt == "b"